package com.ftg.learn.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 描述     角色 操作表
 *
 * @author 布衣
 * @date 2024/12/19
 */
@Mapper
public interface SysRoleMapper {

    @Insert("insert into sys_role(rolename) values(#{rolename})")
    int insert(@Param("rolename") String rolename);

    @Insert("insert into sys_role_resource(roleid, resourcesid) values(#{roleId},#{resourceId})")
    int assignResource(@Param("roleId") Integer roleId, @Param("resourceId") Integer resourceId);
}
